<template>
  <div class="app-content music">
    <div class="music-top">
      <img src="/static/images/music/music-box.png" alt="">
      <div class="music-right">
        <span class="title">晓说2018</span>
        <div class="right-box">
          <span>更新于2018-09-29</span>
          <span>25688.3w</span>
        </div>
        <div class="right-box">
          <span class="play">
            <img src="/static/images/music/music-play.png" alt="">
            播放
          </span>
          <span class="collec">
            <img src="/static/images/music/collec.png" alt="">
            收藏
          </span>
        </div>
      </div>
    </div>
    <div class="music-bottom">
      <span class="title">往期声音</span>
      <div class="list">
        <ul>
          <li v-for="(item,index) in 30" :key="index" @click="musicPlay(index)">
            <span> <img v-if="index == play" src="/static/images/music/pause.png" alt=""><img v-else src="/static/images/music/play.png" alt=""> 01.1919手工制造新世界(-)复仇联盟{{index}}</span><span>2018-09-24</span>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      play: -1
    };
  },
  components: {},
  methods: {
    musicPlay(index) {
      this.play = index;
      console.log(index);
      console.log(this.play);
    }
  }
};
</script>
<style lang="less" scoped>
.music {
  margin-top: 20px;
  padding: 30px 20px;
  background: #fff;
  border-radius: 10px;
  .music-top {
    display: flex;
    img {
      width: 312px;
      height: 274px;
    }
    .music-right {
      margin-left: 40px;
      display: flex;
      flex-direction: column;
      .title {
        font-size: 24px;
      }
      .right-box {
        margin-top: 30px;
        color: #808080;
        display: flex;
        align-items: center;
        .play {
          font-size: 24px;
          display: flex;
          align-items: center;
          img {
            width: 80px;
            height: 80px;
            margin-right: 22px;
          }
        }
        .collec {
          display: flex;
          align-items: center;
          img {
            width: 22px;
            height: 22px;
            margin-right: 10px;
          }
        }
        span + span {
          margin-left: 48px;
        }
      }
      .right-box:last-child {
        margin-top: 100px;
      }
    }
  }
  .music-bottom {
    .title {
      display: block;
      margin-top: 40px;
      padding-left: 10px;
      padding-bottom: 12px;
      border-bottom: 1px solid #c1c1c1;
      font-size: 16px;
      color: #15c798;
      font-weight: bold;
      position: relative;
    }
    .title::after {
      content: "";
      display: inline-block;
      width: 8px;
      height: 8px;
      background: #fff;
      border-top: 1px solid #c1c1c1;
      border-right: 1px solid #c1c1c1;
      transform: rotate(-45deg);
      position: absolute;
      bottom: -5px;
      left: 35px;
    }
    .list {
      ul {
        padding-left: 0px;
        li {
          font-size: 16px;
          color: #808080;
          padding: 20px 0 20px 10px;
          display: flex;
          justify-content: space-between;
          border-bottom: 1px solid #c1c1c1;
          cursor: pointer;
          span {
            display: flex;
            align-items: center;
            img {
              margin-right: 18px;
            }
          }
        }
      }
    }
  }
}
</style>


